<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>HelloWorld_React</title>
</head>
<body>
  <div id="test"></div>
  <script type="text/javascript" src="../js/react.development.js"></script>
  <script type="text/javascript" src="../js/react-dom.development.js"></script>
  <script type="text/javascript" src="../js/babel.min.js"></script>
  <link type="text/css" rel="stylesheet" href="./react.css">

  <script type="text/babel">
    const hello = 'Hello React'
    const img = './react.png'

    const vJSXDom = 
    <div id='myId' style={{color:'red'}} >
      <h1>{hello.toUpperCase()}</h1>
      <img src = {img} alt='这是一个图片' className='reactImg'></img>
    </div>
    // 渲染虚拟DOM到页面真实DOM容器中
    ReactDOM.render(vJSXDom, document.getElementById('test'))
    
  </script>

</body>
</html>
